package br.com.translog.gui.funcionario;

import br.com.translog.fachada.FachadaTranslog;
import br.com.translog.gui.outro.FrmMenuPrincipal;
import br.com.translog.modelo.Funcionario;
import java.text.SimpleDateFormat;
import javax.swing.JOptionPane;

public class FrmFuncionarioConsultar extends javax.swing.JFrame {

    /**
     * Creates new form FrmFuncionarioCadastrar
     */
    public FrmFuncionarioConsultar() {
        initComponents();
        setLocationRelativeTo(null);
    }

    /**
     * This method is called from within the constructor to initialize the form. WARNING: Do NOT
     * modify this code. The content of this method is always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlFuncionarioConsultar = new javax.swing.JPanel();
        lblConsultarFuncionario = new javax.swing.JLabel();
        lblMatricula = new javax.swing.JLabel();
        lblNome = new javax.swing.JLabel();
        lblRG = new javax.swing.JLabel();
        lblCPF = new javax.swing.JLabel();
        lblSexo = new javax.swing.JLabel();
        lblEstadoCivil = new javax.swing.JLabel();
        lblDataNascimento = new javax.swing.JLabel();
        lblEndereco = new javax.swing.JLabel();
        lblNumero = new javax.swing.JLabel();
        lblComplemento = new javax.swing.JLabel();
        lblBairro = new javax.swing.JLabel();
        lblCidade = new javax.swing.JLabel();
        lblCEP = new javax.swing.JLabel();
        lblEstado = new javax.swing.JLabel();
        lblTelefoneResidecial = new javax.swing.JLabel();
        lblTelefoneCelular = new javax.swing.JLabel();
        lblCargo = new javax.swing.JLabel();
        lblDataAdmissao = new javax.swing.JLabel();
        lblEmailEmpresarial = new javax.swing.JLabel();
        lblBanco = new javax.swing.JLabel();
        lblAgencia = new javax.swing.JLabel();
        lblNumeroConta = new javax.swing.JLabel();
        lblTipoConta = new javax.swing.JLabel();
        lblSalario = new javax.swing.JLabel();
        txtMatricula = new javax.swing.JTextField();
        txtNome = new javax.swing.JTextField();
        txtRG = new javax.swing.JTextField();
        txtCPF = new javax.swing.JTextField();
        txtSexo = new javax.swing.JTextField();
        txtEstadoCivil = new javax.swing.JTextField();
        txtDataNascimento = new javax.swing.JTextField();
        txtEndereco = new javax.swing.JTextField();
        txtNumero = new javax.swing.JTextField();
        txtComplemento = new javax.swing.JTextField();
        txtBairro = new javax.swing.JTextField();
        txtCidade = new javax.swing.JTextField();
        txtCEP = new javax.swing.JTextField();
        txtEstado = new javax.swing.JTextField();
        txtTelefoneResidecial = new javax.swing.JTextField();
        txtTelefoneCelular = new javax.swing.JTextField();
        txtCargo = new javax.swing.JTextField();
        txtDataAdmissao = new javax.swing.JTextField();
        txtEmailEmpresarial = new javax.swing.JTextField();
        txtSalario = new javax.swing.JTextField();
        txtBanco = new javax.swing.JTextField();
        txtAgencia = new javax.swing.JTextField();
        txtNumeroConta = new javax.swing.JTextField();
        txtTipoConta = new javax.swing.JTextField();
        btnPesquisar = new javax.swing.JButton();
        btnVoltarMenu = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("TransLog - Sistema de Entrega de Transportadora - Consulta de Funcionário");
        setMinimumSize(new java.awt.Dimension(976, 337));
        setName("frmFuncionarioCadastrar"); // NOI18N
        setResizable(false);
        setType(java.awt.Window.Type.POPUP);

        pnlFuncionarioConsultar.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        pnlFuncionarioConsultar.setMaximumSize(new java.awt.Dimension(956, 315));
        pnlFuncionarioConsultar.setMinimumSize(new java.awt.Dimension(956, 315));

        lblConsultarFuncionario.setFont(new java.awt.Font("Tahoma", 1, 15)); // NOI18N
        lblConsultarFuncionario.setText("CONSULTAR FUNCIONARIO");
        lblConsultarFuncionario.setName(""); // NOI18N

        lblMatricula.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblMatricula.setText("Matrícula");

        lblNome.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblNome.setText("Nome");

        lblRG.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblRG.setText("RG");

        lblCPF.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblCPF.setText("CPF");

        lblSexo.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblSexo.setText("Sexo");

        lblEstadoCivil.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblEstadoCivil.setText("Estado Civil");

        lblDataNascimento.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblDataNascimento.setText("Data Nascimento");

        lblEndereco.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblEndereco.setText("Endereço");

        lblNumero.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblNumero.setText("Número");

        lblComplemento.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblComplemento.setText("Complemento");

        lblBairro.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblBairro.setText("Bairro");

        lblCidade.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblCidade.setText("Cidade");

        lblCEP.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblCEP.setText("CEP");

        lblEstado.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblEstado.setText("Estado");

        lblTelefoneResidecial.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblTelefoneResidecial.setText("Telefone Residencial");

        lblTelefoneCelular.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblTelefoneCelular.setText("Telefone Celular");

        lblCargo.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblCargo.setText("Cargo");

        lblDataAdmissao.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblDataAdmissao.setText("Data Admissão");

        lblEmailEmpresarial.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblEmailEmpresarial.setText("Email Empresarial");

        lblBanco.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblBanco.setText("Banco");

        lblAgencia.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblAgencia.setText("Agência");

        lblNumeroConta.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblNumeroConta.setText("Número Conta");

        lblTipoConta.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblTipoConta.setText("Tipo Conta");

        lblSalario.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblSalario.setText("Salário");

        txtNome.setEditable(false);

        txtRG.setEditable(false);

        txtCPF.setEditable(false);

        txtSexo.setEditable(false);

        txtEstadoCivil.setEditable(false);

        txtDataNascimento.setEditable(false);

        txtEndereco.setEditable(false);

        txtNumero.setEditable(false);

        txtComplemento.setEditable(false);

        txtBairro.setEditable(false);

        txtCidade.setEditable(false);

        txtCEP.setEditable(false);

        txtEstado.setEditable(false);

        txtTelefoneResidecial.setEditable(false);

        txtTelefoneCelular.setEditable(false);

        txtCargo.setEditable(false);

        txtDataAdmissao.setEditable(false);

        txtEmailEmpresarial.setEditable(false);

        txtSalario.setEditable(false);

        txtBanco.setEditable(false);

        txtAgencia.setEditable(false);

        txtNumeroConta.setEditable(false);

        txtTipoConta.setEditable(false);

        btnPesquisar.setText("Pesquisar");
        btnPesquisar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPesquisarActionPerformed(evt);
            }
        });

        btnVoltarMenu.setText("Voltar Menu");
        btnVoltarMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVoltarMenuActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlFuncionarioConsultarLayout = new javax.swing.GroupLayout(pnlFuncionarioConsultar);
        pnlFuncionarioConsultar.setLayout(pnlFuncionarioConsultarLayout);
        pnlFuncionarioConsultarLayout.setHorizontalGroup(
            pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlFuncionarioConsultarLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                                .addComponent(lblBanco)
                                .addGap(48, 48, 48)
                                .addComponent(txtBanco, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(lblAgencia)
                                .addGap(18, 18, 18)
                                .addComponent(txtAgencia, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(lblNumeroConta)
                                .addGap(18, 18, 18)
                                .addComponent(txtNumeroConta)
                                .addGap(18, 18, 18)
                                .addComponent(lblTipoConta)
                                .addGap(18, 18, 18)
                                .addComponent(txtTipoConta, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                                .addComponent(lblEstado)
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                                .addComponent(lblDataAdmissao)
                                .addGap(18, 18, 18)
                                .addComponent(txtDataAdmissao, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(lblEmailEmpresarial)
                                .addGap(18, 18, 18)
                                .addComponent(txtEmailEmpresarial, javax.swing.GroupLayout.PREFERRED_SIZE, 396, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(lblSalario)
                                .addGap(18, 18, 18)
                                .addComponent(txtSalario))))
                    .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                            .addContainerGap()
                            .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                                    .addComponent(lblEstadoCivil)
                                    .addGap(18, 18, 18)
                                    .addComponent(txtEstadoCivil, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(lblDataNascimento)
                                    .addGap(18, 18, 18)
                                    .addComponent(txtDataNascimento, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(lblEndereco)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(txtEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                                            .addComponent(lblNumero)
                                            .addGap(18, 18, 18)
                                            .addComponent(txtNumero))
                                        .addComponent(txtCEP)))
                                .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                                    .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(lblNome)
                                        .addComponent(lblMatricula))
                                    .addGap(31, 31, 31)
                                    .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                                            .addComponent(txtMatricula, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18)
                                            .addComponent(btnPesquisar)
                                            .addGap(18, 18, 18)
                                            .addComponent(btnVoltarMenu))
                                        .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                                            .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 353, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18)
                                            .addComponent(lblRG)
                                            .addGap(18, 18, 18)
                                            .addComponent(txtRG, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18)
                                            .addComponent(lblCPF)
                                            .addGap(18, 18, 18)
                                            .addComponent(txtCPF, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18)
                                            .addComponent(lblSexo)
                                            .addGap(18, 18, 18)
                                            .addComponent(txtSexo, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                                    .addComponent(lblComplemento)
                                    .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(txtEstado, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18)
                                            .addComponent(lblTelefoneResidecial)
                                            .addGap(18, 18, 18)
                                            .addComponent(txtTelefoneResidecial, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18)
                                            .addComponent(lblTelefoneCelular)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(txtTelefoneCelular, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                                            .addGap(4, 4, 4)
                                            .addComponent(txtComplemento, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18)
                                            .addComponent(lblBairro)
                                            .addGap(18, 18, 18)
                                            .addComponent(txtBairro, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18)
                                            .addComponent(lblCidade)
                                            .addGap(18, 18, 18)
                                            .addComponent(txtCidade, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGap(18, 18, 18)
                                    .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(lblCEP)
                                        .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                                            .addComponent(lblCargo)
                                            .addGap(18, 18, 18)
                                            .addComponent(txtCargo))))))
                        .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                            .addGap(357, 357, 357)
                            .addComponent(lblConsultarFuncionario))))
                .addContainerGap())
        );
        pnlFuncionarioConsultarLayout.setVerticalGroup(
            pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlFuncionarioConsultarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblConsultarFuncionario)
                .addGap(17, 17, 17)
                .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblMatricula)
                    .addComponent(txtMatricula, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnPesquisar)
                    .addComponent(btnVoltarMenu))
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblNome)
                    .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblRG)
                    .addComponent(txtRG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCPF)
                    .addComponent(txtCPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblSexo)
                    .addComponent(txtSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEstadoCivil)
                    .addComponent(lblDataNascimento)
                    .addComponent(txtDataNascimento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblEndereco)
                    .addComponent(txtEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblNumero)
                    .addComponent(txtNumero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtEstadoCivil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblComplemento)
                    .addComponent(txtComplemento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblBairro)
                    .addComponent(lblCidade)
                    .addComponent(lblCEP)
                    .addComponent(txtCEP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtBairro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtCidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEstado)
                    .addComponent(txtTelefoneResidecial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblTelefoneCelular)
                    .addComponent(txtTelefoneCelular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCargo)
                    .addComponent(txtEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtCargo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblTelefoneResidecial))
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDataAdmissao)
                    .addComponent(lblEmailEmpresarial)
                    .addComponent(txtEmailEmpresarial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtDataAdmissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblSalario)
                    .addComponent(txtSalario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlFuncionarioConsultarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblBanco)
                    .addComponent(txtBanco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblAgencia)
                    .addComponent(txtAgencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblNumeroConta)
                    .addComponent(txtNumeroConta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblTipoConta)
                    .addComponent(txtTipoConta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        lblConsultarFuncionario.getAccessibleContext().setAccessibleDescription("");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlFuncionarioConsultar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlFuncionarioConsultar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnPesquisarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPesquisarActionPerformed
        
        Funcionario f;
        
        try {
            //Verifica se o campo de pesquisa nao esta em "branco"...
            if (!txtMatricula.getText().equals("")) {
                f = FachadaTranslog.getInstFachadaTranslog().consultaFuncionario(Integer.parseInt
                                                                                  (txtMatricula.getText()));
                if (f == null) {
                    JOptionPane.showMessageDialog(null, "Funcionário não Encontrado!");
                } else {
                    //Convertendo as datas para exibicao no JTextField...
                    String dataAdmBanco = new SimpleDateFormat("dd/MM/yyyy").format(f.getDataAdmissao());
                    String dataNascBanco = new SimpleDateFormat("dd/MM/yyyy").format(f.getCodigoPessoaFisica()
                                                                                     .getDataNascimento());
                    //Setando os valores do objeto funcionario nos JTextFields...
                    txtAgencia.setText(String.valueOf(f.getAgenciaConta()));
                    txtBairro.setText(f.getCodigoLogradouro().getCodigoBairro().getNome());
                    txtBanco.setText(f.getBancoConta());
                    txtCEP.setText(String.valueOf(f.getCodigoLogradouro().getCep()));
                    txtCPF.setText(String.valueOf(f.getCodigoPessoaFisica().getCpf()));
                    txtCargo.setText(f.getCargo());
                    txtCidade.setText(String.valueOf(f.getCodigoLogradouro().getCodigoCidade().getNome()));
                    txtComplemento.setText(f.getCodigoLogradouro().getComplemento());
                    txtDataAdmissao.setText(dataAdmBanco);
                    txtDataNascimento.setText(dataNascBanco);
                    txtEmailEmpresarial.setText(f.getEmailEmpresa());
                    txtEndereco.setText(f.getCodigoLogradouro().getEndereco());
                    txtEstado.setText(f.getCodigoLogradouro().getCodigoEstado().getNome());
                    txtEstadoCivil.setText(f.getCodigoPessoaFisica().getEstadoCivil());
                    txtNome.setText(f.getCodigoPessoaFisica().getNome());
                    txtNumero.setText(String.valueOf(f.getCodigoLogradouro().getNumero()));
                    txtNumeroConta.setText(String.valueOf(f.getNumeroConta()));
                    txtRG.setText(String.valueOf(f.getCodigoPessoaFisica().getRg()));
                    txtSalario.setText(String.valueOf(f.getSalario()));
                    txtSexo.setText(String.valueOf(f.getCodigoPessoaFisica().getSexo()));
                    txtTelefoneCelular.setText(String.valueOf(f.getCodigoPessoaFisica().getTelefoneCelular()));
                    txtTelefoneResidecial.setText(String.valueOf(f.getCodigoPessoaFisica().getTelefoneResidencial()));
                    txtTipoConta.setText(f.getTipoConta());
                }
                
            } else {
                JOptionPane.showMessageDialog(null, "Dados Obrigatórios não Informados!");
            }
            
        } catch (Exception e) {
        }  
    }//GEN-LAST:event_btnPesquisarActionPerformed

    private void btnVoltarMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVoltarMenuActionPerformed
        
        new FrmMenuPrincipal().setVisible(true);
        this.dispose();
    }//GEN-LAST:event_btnVoltarMenuActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FrmFuncionarioConsultar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FrmFuncionarioConsultar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FrmFuncionarioConsultar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FrmFuncionarioConsultar.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                new FrmFuncionarioConsultar().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnPesquisar;
    private javax.swing.JButton btnVoltarMenu;
    private javax.swing.JLabel lblAgencia;
    private javax.swing.JLabel lblBairro;
    private javax.swing.JLabel lblBanco;
    private javax.swing.JLabel lblCEP;
    private javax.swing.JLabel lblCPF;
    private javax.swing.JLabel lblCargo;
    private javax.swing.JLabel lblCidade;
    private javax.swing.JLabel lblComplemento;
    private javax.swing.JLabel lblConsultarFuncionario;
    private javax.swing.JLabel lblDataAdmissao;
    private javax.swing.JLabel lblDataNascimento;
    private javax.swing.JLabel lblEmailEmpresarial;
    private javax.swing.JLabel lblEndereco;
    private javax.swing.JLabel lblEstado;
    private javax.swing.JLabel lblEstadoCivil;
    private javax.swing.JLabel lblMatricula;
    private javax.swing.JLabel lblNome;
    private javax.swing.JLabel lblNumero;
    private javax.swing.JLabel lblNumeroConta;
    private javax.swing.JLabel lblRG;
    private javax.swing.JLabel lblSalario;
    private javax.swing.JLabel lblSexo;
    private javax.swing.JLabel lblTelefoneCelular;
    private javax.swing.JLabel lblTelefoneResidecial;
    private javax.swing.JLabel lblTipoConta;
    private javax.swing.JPanel pnlFuncionarioConsultar;
    private javax.swing.JTextField txtAgencia;
    private javax.swing.JTextField txtBairro;
    private javax.swing.JTextField txtBanco;
    private javax.swing.JTextField txtCEP;
    private javax.swing.JTextField txtCPF;
    private javax.swing.JTextField txtCargo;
    private javax.swing.JTextField txtCidade;
    private javax.swing.JTextField txtComplemento;
    private javax.swing.JTextField txtDataAdmissao;
    private javax.swing.JTextField txtDataNascimento;
    private javax.swing.JTextField txtEmailEmpresarial;
    private javax.swing.JTextField txtEndereco;
    private javax.swing.JTextField txtEstado;
    private javax.swing.JTextField txtEstadoCivil;
    private javax.swing.JTextField txtMatricula;
    private javax.swing.JTextField txtNome;
    private javax.swing.JTextField txtNumero;
    private javax.swing.JTextField txtNumeroConta;
    private javax.swing.JTextField txtRG;
    private javax.swing.JTextField txtSalario;
    private javax.swing.JTextField txtSexo;
    private javax.swing.JTextField txtTelefoneCelular;
    private javax.swing.JTextField txtTelefoneResidecial;
    private javax.swing.JTextField txtTipoConta;
    // End of variables declaration//GEN-END:variables
}
